﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Order
{
    public class OrderDetail
    {
        public int OrderdetailID { get; set; }
        public string ProductID { get; set; }
        public int ProductNumber { get; set; }
        public int Value { get; set; }
        public OrderDetail(int orderdetailID, string productID, int productNumber, int value)
        {
            this.OrderdetailID = orderdetailID;
            this.ProductID = productID;
            this.ProductNumber = productNumber;
            this.Value = value;
        }
        public override string ToString()
        {
            return "ID：" + OrderdetailID + " 产品：" + ProductID + " 产品数：" + ProductNumber + " 单价：" + Value;
        }
        public override bool Equals(object obj)
        {
            OrderDetail m = obj as OrderDetail;
            return m.OrderdetailID == this.OrderdetailID && m != null;
        }
        public override int GetHashCode()
        {
            return base.GetHashCode();
        }
    }
}

